import React from 'react';
import { Dialog } from '@teamix/ui';
import intl from '../../../../../../../../../../locale';

export default class CmdModal extends React.Component {
  render() {
    const { visible, modalData, onClose } = this.props;
    return (
      <Dialog
        visible={visible}
        onOk={onClose}
        onCancel={onClose}
        size="normal"
        onClose={onClose}
        footer={false}
        title={intl.get({
          id: 'code-assets.containers.lfsList.cmdModal.ViewSubmittedFiles',
          defaultMessage: '查看文件所属提交',
        })}
        className="lfs-cmd-dialog"
      >
        <div className="lfs-cmd-content">
          <div className="title">
            {intl.get({
              id: 'code-assets.containers.lfsList.cmdModal.RunTheFollowingCommandLocally',
              defaultMessage: '本地使用以下命令查找当前 OID 文件所属提交:',
            })}
          </div>
          <pre className="light-well way-content">
            git fetch
            <br />
            git log -p --all -S {modalData}
          </pre>
        </div>
      </Dialog>
    );
  }
}
